package com.itheima.springTest.controller;

import com.itheima.springTest.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/insert")
    public String insert(Model model, User user, @RequestParam("name")String name) {
        model.addAttribute("msg", user.toString());
        return "hello";
    }

    @RequestMapping("/update")
    public String update(Model model,User user){
        return "hello";
    }
}
